<template>
	<view class="Global">
		<!-- <image class="imagepage" src="/static/background@2x.png" mode=""></image> -->
		<bgImage></bgImage>
		<MyNav :title="title" bgColor="" :backIcon="isback"></MyNav>


		<image src="../../../static/gongzuotai/rufei_chenggong@2x.png" class="logoContent" mode=""></image>
		<text class="tipsContent">入菲成功，数据如下</text>


		<view class="contentCenter">



			<view class="contentCenterTop">
				<text class="contentCenterTopLeft">订单任务</text>
				<text class="contentCenterTopRight"></text>
			</view>



			<!-- 列表开始  -->
			<view class="contentCenterList">

				<view class="baseListItemColorRight">


					<view class="baseListItemColorRightItem" v-for="(item2,index2) in listZhaData">
						<view class="baseListItemColorLeftInnerItemRight">

							<text class="baseListItemColorLeftInnerText_1">{{item2.title}}</text>
							<text class="baseListItemColorLeftInnerText">{{item2.content}}</text>
						</view>
						<view class="line" v-if="index2< listZhaData.length-2"></view>
					</view>
          <view class="baseListItemColorRightItem" >
            <view class="baseListItemColorLeftInnerItemRight2">
              <text class="baseListItemColorLeftInnerText_2">工序：</text>
              <text class="baseListItemColorLeftInnerText2">{{processData}}</text>
            </view>
          </view>

				</view>


			</view>

			<!-- 列表结束 -->


			<view class="contentCenterTop">
				<text class="contentCenterTopLeft">今日完成情况</text>
				<text class="contentCenterTopRight">{{todayTime}}</text>
			</view>


			<!-- 列表内容开始 -->
			<view class="listContent">


				<view class="listContentTop">
					<text class="listContentTopText">今天扎数</text>
					<text class="listContentTopText">今天数量</text>
					<text class="listContentTopText">今天金额</text>
				</view>

				<view class="listContentTop">
					<text class="listContentTopText2">{{todayData.total}}</text>
					<text class="listContentTopText2">{{todayData.quantity}}</text>
					<text class="listContentTopText2">{{todayData.price}}</text>
				</view>


			</view>
			<!-- 列表内容结束 -->



		</view>


		<view class="loginContent">

			<button @click="createOrder()" style="color:#ffffff" class="login" type="default">{{login}}</button>
		</view>



	</view>
</template>

<script>
	import MyNav from '@/components/customnavbar.vue'
	import bgImage from '@/components/backgroundImage.vue'

	export default {
		components: {
			MyNav,
			bgImage
		},
		data() {
			return {
				login: '返回',

				title: '结果',

				isback: true,

				listZhaData: [
          //   {
					// 	title: '订单号',
					// 	content: '123'
					// },
					// {
					// 	title: '工序',
					// 	content: '平车'
					// },
					{
						title: '扎号',
						content: '10'
					},
					{
						title: '数量',
						content: '0'
					}

				],
        todayData: {},
        todayTime: '',
        processList: [],
        processData: '',
        orderData: {},
			}
		},
    onLoad: function (option) {
      console.log('option',option)
      let data = JSON.parse(decodeURIComponent(option.data));
      this.todayData = data.situation
      this.todayTime = data.dateTime
      this.orderData = data.order
      let that = this
      this.listZhaData.forEach(item=>{
        if(item.title=='扎号'){
          item.content = data.bundleCode
        }
        if(item.title=='数量'){
          item.content = data.quantity
        }
      })
      data.processList.filter((data, Index) => {
        that.processList.push(data.processName)
      })
      this.processData = this.processList.join(",")
    },
		methods: {

			// 返回
			createOrder(){
				/* uni.navigateBack({
					delta: 1
				}); */

				uni.navigateTo({
					url: '/subPack/workInThePhilippines/scanTheCode/scanTheCode',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}

		}
	}
</script>

<style lang="scss">

	.imagepage {

		background-size: cover;
		background-repeat: no-repeat;
		background-position: center center;
		position: absolute;
		z-index: -1;
		left: 0;
		right: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;

	}

	.loginContent {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 750rpx;

		margin-top: 30rpx;
	}

	.login {
		display: flex;
		justify-content: center;
		margin-top: 20rpx;
		width: 690rpx;
		height: 100rpx;

		border-radius: 30rpx;
		font-weight: 400;
		font-size: 36rpx;
		color: #FFFFFF;
		text-align: center;
		font-weight: bold;


		background: linear-gradient(90deg, #45A8FF, #0AE1C6);

	}



	.listContentTopText2 {

		display: flex;
		align-items: center;
		justify-content: center;


		font-family: HarmonyOS Sans SC;
		font-weight: bold;
		font-size: 28rpx;
		color: #333333;
		line-height: 36rpx;

		width: 33.3%;

	}

	.listContentTopText {

		display: flex;
		align-items: center;
		justify-content: center;
		font-family: HarmonyOS Sans SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #999999;
		line-height: 36rpx;

		width: 33.3%;
	}


	.listContentTop {

		display: flex;
		justify-content: space-evenly;
		align-items: center;
		width: 100%;
	}

	.listContent {
		width: 630rpx;
		height: 124rpx;
		background: #F5F7F9;
		border-radius: 20rpx;

		flex-direction: column;

		display: flex;
		justify-content: center;
		align-items: center;
	}


	.baseListItemColorLeftInnerText {

		font-family: HarmonyOS Sans SC;
		font-weight: 600;
		font-size: 24rpx;
		color: #333333;


		display: flex;
		justify-content: center;
		align-items: center;

		text-align: center;
		margin-right: 10rpx;


	}

	.baseListItemColorLeftInnerText_1 {
		font-family: HarmonyOS Sans SC;
		font-weight: 600;
		font-size: 24rpx;
		color: #999999;


		display: flex;
		justify-content: center;
		align-items: center;
		margin-left: 10rpx;
		margin-right: 10rpx;

	}

	.baseListItemColorLeftInnerItemRight {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		width: 315rpx;
		height: 80rpx;
		/* background: #F5F7F9; */



	}

	.baseListItemColorRightItem {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		flex: 0 0 calc((100%)/2);


	}

	.baseListItemColorRight {

		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		width: 100%;
		height: 100%;

		flex-wrap: wrap;
		margin-top: 10rpx;

		// background-color: #0AE1C6;
	}



	.contentCenterList {

		display: flex;
		justify-content: center;
		flex-direction: column;
		align-items: center;
		width: 630rpx;
		height: 160rpx;
		background: #EEEEEE;

		border-radius: 10rpx;

		margin-top: 30rpx;
	}

	.contentCenterTopRight {

		display: flex;
		justify-content: center;
		align-items: center;


		font-family: HarmonyOS Sans SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #999999;
		height: 100%;
		margin-right: 30rpx;
	}

	.contentCenterTopLeft {

		display: flex;
		justify-content: center;
		align-items: center;
		font-family: HarmonyOS Sans SC;
		font-weight: bold;
		font-size: 24rpx;
		color: #333333;
		height: 100%;

		margin-left: 30rpx;
	}

	.contentCenterTop {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		height: 100rpx;

	}

	.contentCenter {

		width: 690rpx;
		height: 533rpx;
		background: #FFFFFF;

		border-radius: 30rpx;

		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;

		margin-top: 60rpx;
	}

	.tipsContent {


		font-family: HarmonyOS Sans SC;
		font-weight: bold;
		font-size: 36rpx;
		color: #333333;
		line-height: 30rpx;

		margin-top: 30rpx;
	}

	.logoContent {

		width: 239rpx;
		height: 218rpx;
		margin-top: 96rpx;
	}
</style>
